/**
 * loaclstorage的二次封装
 */
import config from "../config"
export default {
  setItem(key, val) {
    let storage = this.getStorage
    storage[key] = val
    window.localStorage.setItem(config.namespace, JSON.stringify(storage))
  },
  getItem(key) {
    return window.localStorage.getI
  },
  getStorage() {
    return JSON.stringify(window.localStorage.getItem(config.namespace) || {})
  }
}